# spec/support/fake_github.rb
require 'sinatra'
require 'sinatra/json'
require 'json'


class FakeGitHub < Sinatra::Base
  get '/repos/:organization/:project/contributors' do
    #content_type :json
    #status 200
    #return json

    # read file into string
    str     = IO.read File.dirname(__FILE__) + '/fixtures/' + 'contributors.json'
    # convert to ruby hash
    result  = JSON.parse str
    # json return
    #json result

    options = {:font_size => 10, :font_family => "Arial"}

    #json options
    json :foo => 'bar'
  end
end